home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc / OpenDoc Development / Debugging Support / OpenDoc™ Source Code / Storage / Bento / CMCtr.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-28  |  18.6 KB  |  618 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        CMCtr.cpp
  3.  
  4.     Contains:    Implementation of ODBentoContainer class.
  5.  
  6.     Owned by:    Vincent Lo
  7.  
  8.     Copyright:    © 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <5>     7/25/96    DH        Fixed ODBentoContainerAcquireDocument
  13.                                     method to check the somClassReference
  14.                                     allocation and throw if null (No bug #,
  15.                                     approved by Bern).
  16.          <4>      6/6/96    jpa        T10020: Fixed uninitialized ODContainerName
  17.                                     warning
  18.          <3>     5/24/96    jpa        1246074: SOM_CATCH --> SOM_TRY..SOM_ENDTRY
  19.  
  20.     To Do:
  21.     In Progress:
  22.         
  23. */
  24.  
  25. #define ODBentoContainer_Class_Source
  26.  
  27. #define VARIABLE_MACROS
  28.  
  29. #include <CMCtr.xih>
  30.  
  31. #ifndef _PLFMDEF_
  32. #include "PlfmDef.h"
  33. #endif
  34.  
  35. #ifndef _ODTYPES_
  36. #include "ODTypes.h"
  37. #endif
  38.  
  39. #ifndef SOM_ODStorageSystem_xh
  40. #include <ODStor.xh>
  41. #endif
  42.  
  43. #ifndef SOM_ODDocument_xh
  44. #include <Document.xh>
  45. #endif
  46.  
  47. #ifndef SOM_CMDocument_xh
  48. #include <CMDoc.xh>
  49. #endif
  50.  
  51. #ifndef SOM_ODSession_xh
  52. #include <ODSessn.xh>
  53. #endif
  54.  
  55. #ifndef _SESSHDR_
  56. #include "SessHdr.h"        // for sessionRoutinesMetahandler
  57. #endif
  58.  
  59. #ifndef __CM_API__
  60. #include "CMAPI.h"
  61. #endif
  62.  
  63. #ifndef _BENTOHDR_
  64. #include "BentoHdr.h"
  65. #endif
  66.  
  67. #ifndef _EXCEPT_
  68. #include "Except.h"
  69. #endif
  70.  
  71. #ifndef SOM_Module_OpenDoc_Errors_defined 
  72. #include <ErrorDef.xh>
  73. #endif
  74.  
  75. #ifndef _ODNEW_
  76. #include <ODNew.h>
  77. #endif
  78.  
  79. #ifndef SOM_ODNameSpaceManager_xh
  80. #include <NmSpcMg.xh>
  81. #endif
  82.  
  83. #ifndef SOM_ODValueNameSpace_xh
  84. #include <ValueNS.xh>
  85. #endif
  86.  
  87. #ifdef DebugRefCount
  88. #include <stdio.h>
  89. #endif
  90.  
  91. #ifndef _ITEXT_
  92. #include <IText.h>
  93. #endif
  94.  
  95. #ifndef _BARRAY_
  96. #include <BArray.h>
  97. #endif
  98.  
  99. #ifndef _BENTODEF_
  100. #include "BentoDef.h"
  101. #endif
  102.  
  103. #ifndef _ODMEMORY_
  104. #include "ODMemory.h"    // Adkins -- added
  105. #endif
  106.  
  107. #ifndef _ODDEBUG_
  108. #include "ODDebug.h"    // Adkins -- added
  109. #endif
  110.  
  111. #ifndef _NMSPCUTL_
  112. #include <NmSpcUtl.h>
  113. #endif
  114.  
  115.  
  116. #pragma segment BentoCtr
  117.  
  118. //==============================================================================
  119. // Constants
  120. //==============================================================================
  121.  
  122. const ODISOStr    kODContainerSuitesNameSpace = "OpenDoc:Apple:Macintosh:Container Suites";
  123. const ODISOStr    kODBentoContainerSuite = "OpenDoc:Apple:Macintosh:Container Suite:Bento";
  124. #define kODExpectedNumOfContainerSuites 10
  125.  
  126. //==============================================================================
  127. // ODBentoContainer
  128. //==============================================================================
  129.  
  130. //------------------------------------------------------------------------------
  131. // ODBentoContainer: GetStorageSystem
  132. //------------------------------------------------------------------------------
  133.  
  134. SOM_Scope ODStorageSystem*  SOMLINK ODBentoContainerGetStorageSystem(ODBentoContainer *somSelf, Environment *ev)
  135. {
  136.     ODBentoContainerData *somThis = ODBentoContainerGetData(somSelf);
  137.     ODBentoContainerMethodDebug("ODBentoContainer","GetStorageSystem");
  138.  
  139.     return _fStorageSystem;
  140. }
  141.  
  142. //------------------------------------------------------------------------------
  143. // ODBentoContainer: GetID
  144. //------------------------------------------------------------------------------
  145.  
  146. SOM_Scope ODContainerID  SOMLINK ODBentoContainerGetID(ODBentoContainer *somSelf, Environment *ev)
  147. {
  148.     ODBentoContainerData *somThis = ODBentoContainerGetData(somSelf);
  149.     ODBentoContainerMethodDebug("ODBentoContainer","GetID");
  150.  
  151.     ODContainerID id;
  152.     
  153.     SOM_TRY
  154.     
  155.     id = CopyByteArrayStruct(_fID);
  156.     
  157.     SOM_CATCH_ALL
  158.     SOM_ENDTRY
  159.     return id;
  160. }
  161.  
  162. //------------------------------------------------------------------------------
  163. // ODBentoContainer: GetName
  164. //------------------------------------------------------------------------------
  165.  
  166. SOM_Scope ODContainerName  SOMLINK ODBentoContainerGetName(ODBentoContainer *somSelf, Environment *ev)
  167. {
  168.     ODBentoContainerData *somThis = ODBentoContainerGetData(somSelf);
  169.     ODBentoContainerMethodDebug("ODBentoContainer","GetName");
  170.  
  171.     WARN("A subclass should have overridden this method!");
  172.     ODSetSOMException(ev,kODErrSubClassResponsibility, "SubClass Responsibility");
  173.     ODContainerName dummy = {0,0,kODNULL};
  174.     return dummy;
  175. }
  176.  
  177. //------------------------------------------------------------------------------
  178. // ODBentoContainer: SetName
  179. //------------------------------------------------------------------------------
  180.  
  181. SOM_Scope void  SOMLINK ODBentoContainerSetName(ODBentoContainer *somSelf, Environment *ev,
  182.         ODContainerName* name)
  183. {
  184.     ODBentoContainerData *somThis = ODBentoContainerGetData(somSelf);
  185.     ODBentoContainerMethodDebug("ODBentoContainer","SetName");
  186.     
  187.     WARN("A subclass should have overridden this method!");
  188.     ODSetSOMException(ev,kODErrSubClassResponsibility, "SubClass Responsibility");
  189. }
  190.  
  191. //------------------------------------------------------------------------------
  192. // ODBentoContainer: AcquireDocument
  193. //------------------------------------------------------------------------------
  194.  
  195. SOM_Scope ODDocument*  SOMLINK ODBentoContainerAcquireDocument(ODBentoContainer *somSelf, Environment *ev,
  196.         ODDocumentID id)
  197. {
  198.     ODBentoContainerData *somThis = ODBentoContainerGetData(somSelf);
  199.     ODBentoContainerMethodDebug("ODBentoContainer","AcquireDocument");
  200.  
  201.     SOM_TRY
  202.  
  203.     if (_fDocument == kODNULL) {
  204.     
  205.         SOMClass*    cmDocClass = somNewClassReference(CMDocument);
  206.         THROW_IF_NULL( cmDocClass );
  207.         ODULong        size = cmDocClass->somGetInstanceSize();
  208.         ODPtr        buffer = ODNewPtr(size, somSelf->GetHeap(ev));
  209.         ODDocument*    document = (ODDocument*) cmDocClass->somRenew(buffer);
  210.         somReleaseClassReference ( cmDocClass );
  211.         
  212.         if (document != kODNULL) 
  213.         {
  214.             document->InitDocument(ev, somSelf, id);
  215.             _fDocument = document;
  216.         }
  217.     }
  218.     else {
  219.         if (_fDocument->GetID(ev) != id)
  220.             THROW(kODErrDocumentDoesNotExist);
  221.         _fDocument->Acquire(ev);
  222.     }            
  223.  
  224.     return _fDocument;
  225.  
  226.     SOM_CATCH_ALL
  227.     SOM_ENDTRY
  228.     return (ODDocument*) kODNULL;
  229. }
  230.  
  231. //------------------------------------------------------------------------------
  232. // ODBentoContainer: Acquire
  233. //------------------------------------------------------------------------------
  234.  
  235. SOM_Scope void  SOMLINK ODBentoContainerAcquire(ODBentoContainer *somSelf, Environment *ev)
  236. {
  237.     ODBentoContainerData *somThis = ODBentoContainerGetData(somSelf);
  238.     ODBentoContainerMethodDebug("ODBentoContainer","Acquire");
  239.  
  240.     SOM_TRY
  241.  
  242.     ODBentoContainer_parent_ODContainer_Acquire(somSelf, ev);
  243.  
  244.     SOM_CATCH_ALL
  245.     SOM_ENDTRY
  246. }
  247.  
  248. //------------------------------------------------------------------------------
  249. // ODBentoContainer: Release
  250. //------------------------------------------------------------------------------
  251.  
  252. SOM_Scope void  SOMLINK ODBentoContainerRelease(ODBentoContainer *somSelf, Environment *ev)
  253. {
  254.     ODBentoContainerData *somThis = ODBentoContainerGetData(somSelf);
  255.     ODBentoContainerMethodDebug("ODBentoContainer","Release");
  256.     
  257.     SOM_TRY
  258.  
  259.     ODBentoContainer_parent_ODContainer_Release(somSelf, ev);
  260.  
  261.     if (somSelf->GetRefCount(ev) == 0) {
  262.         somSelf->GetStorageSystem(ev)->ReleaseContainer(ev, somSelf);
  263.     }
  264.     
  265.     SOM_CATCH_ALL
  266.     
  267.         ODError err = ErrorCode();
  268.  
  269.         WARN("Error occurred in ODContainer::Release: %d %s", err, ErrorMessage() ?ErrorMessage() :"");
  270.  
  271. //        if (err == kODErrBentoErr)
  272. //            SetErrorCode(kODErrFatalContainerError);
  273. //        else if (err != kODErrFatalContainerError)
  274.             SetErrorCode(kODNoError);
  275.  
  276.     SOM_ENDTRY
  277. }
  278.  
  279. //------------------------------------------------------------------------------
  280. // ODBentoContainer: ~ODBentoContainer
  281. //------------------------------------------------------------------------------
  282.  
  283. SOM_Scope void  SOMLINK ODBentoContainersomUninit(ODBentoContainer *somSelf)
  284. {
  285.     ODBentoContainerData *somThis = ODBentoContainerGetData(somSelf);
  286.     ODBentoContainerMethodDebug("ODBentoContainer","somUninit");
  287.  
  288. #ifdef DebugRefCount
  289.     printf("~ODBentoContainer %x RefCount %d\n", this, somSelf->GetRefCount(ev));
  290.     fflush(stdout);
  291. #endif
  292.  
  293.     Environment*    ev = somGetGlobalEnvironment();
  294.     
  295.     if (_fDocument != kODNULL) {
  296. #if ODDebug
  297.         if (_fDocument->GetRefCount(ev) != 0)
  298.             WARN("Document not ref-counted properly.");
  299. #endif
  300.         delete _fDocument;
  301.         _fDocument = kODNULL;
  302.     }
  303.  
  304.     if (_fID)
  305.     {
  306.         ODDisposePtr(_fID->_buffer);
  307.         ODDisposePtr(_fID);
  308.     }
  309.     
  310.     ODBentoContainer_parent_ODContainer_somUninit(somSelf);
  311. }
  312.  
  313. //------------------------------------------------------------------------------
  314. // ODBentoContainer: InitContainer
  315. //------------------------------------------------------------------------------
  316.  
  317. #define kODcmAllocReserveSize (16 * 1204)
  318.  
  319. SOM_Scope void  SOMLINK ODBentoContainerInitContainer(ODBentoContainer *somSelf, Environment *ev,
  320.         ODStorageSystem* storage, ODContainerID* id)
  321. {
  322.     ODBentoContainerData *somThis = ODBentoContainerGetData(somSelf);
  323.     ODBentoContainerMethodDebug("ODBentoContainer","InitContainer");
  324.  
  325.     SOM_TRY
  326.  
  327.     /* Moved from somInit. SOM itself sets fields to zero
  328.     _fStorageSystem = kODNULL;
  329.     _fID = 0;
  330.     _fDocument = kODNULL;
  331.     _fDirty = kODFalse;
  332.     _fHeap = kDefaultHeapID;
  333.     */
  334.     
  335.     _fStorageSystem = storage;
  336.     if (_fStorageSystem == kODNULL)
  337.         THROW(kODErrIllegalNullStorageSystemInput);
  338.  
  339.     ODBentoContainer_parent_ODContainer_InitContainer(somSelf, ev, storage, id);
  340.  
  341.     _fID = CopyByteArray(id);
  342.     _fHeap = ODRecoverHeapID(somSelf);
  343.     
  344.     ODSession*    session = _fStorageSystem->GetSession(ev);
  345.     ODNameSpaceManager* nameSpaceManager = session->GetNameSpaceManager(ev);
  346.     WASSERTM(nameSpaceManager != kODNULL, "No Name Space Manager");
  347.         
  348.     ODValueNameSpace* nameSpace = (ODValueNameSpace*) nameSpaceManager->HasNameSpace(ev, kODContainerSuitesNameSpace);
  349.     if (nameSpace == kODNULL) {
  350.         nameSpace = (ODValueNameSpace*) nameSpaceManager->CreateNameSpace(ev,
  351.                                             kODContainerSuitesNameSpace,
  352.                                             kODNULL,
  353.                                             kODExpectedNumOfContainerSuites,
  354.                                             kODNSDataTypeODValue);
  355.     }
  356.     
  357.     CMSession  cmSession = kODNULL;
  358.     if (nameSpace->Exists(ev, kODBentoContainerSuite) == kODFalse) {
  359.         ODSessionRefCon* sessionRefCon = new(somSelf->GetHeap(ev)) ODSessionRefCon;
  360.         
  361. #ifdef ODDebugBentoSize
  362.         {
  363.             memset(sessionRefCon, 0, sizeof(ODSessionRefCon));
  364.             SOM_TraceLevel = kODTrue;
  365.         }
  366. #endif        
  367.  
  368.         sessionRefCon->container = kODNULL;
  369.         sessionRefCon->heap = somSelf->GetHeap(ev);
  370.         sessionRefCon->cmAllocReserveBlock = kODNULL; // init to null in case alloc fails
  371.         sessionRefCon->cmAllocReserveSize = kODcmAllocReserveSize;
  372.         sessionRefCon->cmAllocReserveBlock = ODNewPtr(kODcmAllocReserveSize, sessionRefCon->heap);
  373.         
  374.         cmSession = CMStartSession(sessionRoutinesMetahandler, sessionRefCon);
  375.         ValueNameSpaceRegister( nameSpace, ev,
  376.                                 kODBentoContainerSuite,
  377.                                 (ODPtr)&cmSession,
  378.                                 sizeof(CMSession));
  379.     }
  380.     else {
  381.         CMSession* cmSessionPtr;
  382.         ODULong length = 0;
  383.         if (ValueNameSpaceGetEntry(nameSpace, ev, kODBentoContainerSuite, 
  384.                               (ODPtr*) &cmSessionPtr, &length))
  385.         {
  386.             cmSession = *cmSessionPtr;
  387.             ODDeleteObject( cmSessionPtr );
  388.         }
  389.         
  390.         WASSERTM(length == sizeof(CMSession), "No CMSession");
  391.     }
  392.     ASSERTM(cmSession!=kODNULL,kODErrCannotCreateContainer,"Can't find CMSession");
  393.     _fCMSession = cmSession;
  394.  
  395.     SOM_CATCH_ALL
  396.     SOM_ENDTRY
  397. }
  398.  
  399. //------------------------------------------------------------------------------
  400. // ODBentoContainer: Create
  401. //------------------------------------------------------------------------------
  402.  
  403. SOM_Scope ODContainer*  SOMLINK ODBentoContainerCreate(ODBentoContainer *somSelf, Environment *ev)
  404. {
  405.     ODBentoContainerData *somThis = ODBentoContainerGetData(somSelf);
  406.     ODBentoContainerMethodDebug("ODBentoContainer","Create");
  407.  
  408.     WARN("A subclass should have overridden this method!");
  409.     ODSetSOMException(ev,kODErrSubClassResponsibility, "SubClass Responsibility");
  410.     
  411.     return somSelf;
  412. }
  413.  
  414. //------------------------------------------------------------------------------
  415. // ODBentoContainer: Open
  416. //------------------------------------------------------------------------------
  417.  
  418. SOM_Scope ODContainer*  SOMLINK ODBentoContainerOpen(ODBentoContainer *somSelf, Environment *ev)
  419. {
  420.     ODBentoContainerData *somThis = ODBentoContainerGetData(somSelf);
  421.     ODBentoContainerMethodDebug("ODBentoContainer","Open");
  422.  
  423.     WARN("A subclass should have overridden this method!");
  424.     ODSetSOMException(ev,kODErrSubClassResponsibility, "SubClass Responsibility");
  425.  
  426.     return somSelf;
  427. }
  428.  
  429. //------------------------------------------------------------------------------
  430. // ODBentoContainer: Close
  431. //------------------------------------------------------------------------------
  432.  
  433. SOM_Scope ODContainer*  SOMLINK ODBentoContainerClose(ODBentoContainer *somSelf, Environment *ev)
  434. {
  435.     ODBentoContainerData *somThis = ODBentoContainerGetData(somSelf);
  436.     ODBentoContainerMethodDebug("ODBentoContainer","Close");
  437.  
  438.     SOM_TRY
  439.  
  440.     return somSelf;
  441.  
  442.     SOM_CATCH_ALL
  443.     SOM_ENDTRY
  444.     return (ODContainer*) kODNULL;
  445. }
  446.  
  447. //------------------------------------------------------------------------------
  448. // ODBentoContainer: Purge
  449. //------------------------------------------------------------------------------
  450.  
  451. SOM_Scope ODSize  SOMLINK ODBentoContainerPurge(ODBentoContainer *somSelf, Environment *ev,
  452.         ODSize size)
  453. {
  454.     ODBentoContainerData *somThis = ODBentoContainerGetData(somSelf);
  455.     ODBentoContainerMethodDebug("ODBentoContainer","Purge");
  456.     
  457.     ODSize    purgedSize = 0; ODVolatile( purgedSize );
  458.     
  459.     SOM_TRY
  460.  
  461.         purgedSize = parent_Purge(somSelf, ev, size);
  462.         if (_fDocument != kODNULL)
  463.             purgedSize += _fDocument->Purge(ev, size);
  464.     
  465.     SOM_CATCH_ALL
  466.         WARN("Error %ld trying to purge in ODBentoContainerPurge",ErrorCode());
  467.         SetErrorCode(kODNoError);        // Eat the exception; Purge should not 
  468.                                         // propagate it because clients function
  469.                                         // fine whether memory was purged or not.
  470.     SOM_ENDTRY
  471.     
  472.     return purgedSize;
  473. }
  474.  
  475. //------------------------------------------------------------------------------
  476. // ODBentoContainer: ReleaseDocument
  477. //------------------------------------------------------------------------------
  478.  
  479. SOM_Scope ODContainer*  SOMLINK ODBentoContainerReleaseDocument(ODBentoContainer *somSelf, Environment *ev,
  480.         ODDocument* document)
  481. {
  482.     ODBentoContainerData *somThis = ODBentoContainerGetData(somSelf);
  483.     ODBentoContainerMethodDebug("ODBentoContainer","ReleaseDocument");
  484.  
  485.     return somSelf;
  486. }
  487.  
  488. //------------------------------------------------------------------------------
  489. // ODBentoContainer: GetCMContainer
  490. //------------------------------------------------------------------------------
  491.  
  492. SOM_Scope CMContainer  SOMLINK ODBentoContainerGetCMContainer(ODBentoContainer *somSelf, Environment *ev)
  493. {
  494.     ODBentoContainerData *somThis = ODBentoContainerGetData(somSelf);
  495.     ODBentoContainerMethodDebug("ODBentoContainer","ODBentoContainerGetCMContainer");
  496.  
  497.     WARN("A subclass should have overridden this method!");
  498.     ODSetSOMException(ev,kODErrSubClassResponsibility, "SubClass Responsibility");
  499.  
  500.     return (CMContainer) kODNULL;
  501. }
  502.  
  503. //------------------------------------------------------------------------------
  504. // ODBentoContainer: GetHandlers
  505. //------------------------------------------------------------------------------
  506.  
  507. SOM_Scope ODBentoHandlers*  SOMLINK ODBentoContainerGetHandlers(ODBentoContainer *somSelf, Environment *ev)
  508. {
  509.     ODBentoContainerData *somThis = ODBentoContainerGetData(somSelf);
  510.     ODBentoContainerMethodDebug("ODBentoContainer","ODBentoContainerGetHandlers");
  511.  
  512.     WARN("A subclass should have overridden this method!");
  513.     ODSetSOMException(ev,kODErrSubClassResponsibility, "SubClass Responsibility");
  514.  
  515.     return (ODBentoHandlers*) kODNULL;
  516. }
  517.  
  518. //------------------------------------------------------------------------------
  519. // ODBentoContainer: GetDirtyFlag
  520. //------------------------------------------------------------------------------
  521.  
  522. SOM_Scope ODBoolean  SOMLINK ODBentoContainerGetDirtyFlag(ODBentoContainer *somSelf, Environment *ev)
  523. {
  524.     ODBentoContainerData *somThis = ODBentoContainerGetData(somSelf);
  525.     ODBentoContainerMethodDebug("ODBentoContainer","GetDirtyFlag");
  526.  
  527.     return _fDirty;
  528. }
  529.  
  530. //------------------------------------------------------------------------------
  531. // ODBentoContainer: SetDirtyFlag
  532. //------------------------------------------------------------------------------
  533.  
  534. SOM_Scope void  SOMLINK ODBentoContainerSetDirtyFlag(ODBentoContainer *somSelf, Environment *ev, ODBoolean flag)
  535. {
  536.     ODBentoContainerData *somThis = ODBentoContainerGetData(somSelf);
  537.     ODBentoContainerMethodDebug("ODBentoContainer","SetDirtyFlag");
  538.  
  539.     _fDirty = flag;
  540. }
  541.  
  542.  
  543. //------------------------------------------------------------------------------
  544. // ODBentoContainer: GetHeap
  545. //------------------------------------------------------------------------------
  546.  
  547. SOM_Scope ODMemoryHeapID  SOMLINK ODBentoContainerGetHeap(ODBentoContainer *somSelf, Environment *ev)
  548. {
  549.     ODBentoContainerData *somThis = ODBentoContainerGetData(somSelf);
  550.     ODBentoContainerMethodDebug("ODBentoContainer","GetHeap");
  551.  
  552.     return _fHeap;
  553. }
  554.  
  555. //------------------------------------------------------------------------------
  556. // ODBentoContainer: GetCMSession
  557. //------------------------------------------------------------------------------
  558.  
  559. SOM_Scope CMSession  SOMLINK ODBentoContainerGetCMSession(ODBentoContainer *somSelf, Environment *ev)
  560. {
  561.     ODBentoContainerData *somThis = ODBentoContainerGetData(somSelf);
  562.     ODBentoContainerMethodDebug("ODBentoContainer","GetHeap");
  563.  
  564.     if (_fCMSession == kODNULL)
  565.         ODSetSOMException(ev,kODErrBentoNoSession);
  566.         
  567.     return _fCMSession;
  568. }
  569.  
  570. //------------------------------------------------------------------------------
  571. // ODBentoContainer: GetTargetContainer
  572. //------------------------------------------------------------------------------
  573.  
  574. SOM_Scope ODBentoContainer*  SOMLINK ODBentoContainerGetTargetContainer(ODBentoContainer *somSelf, Environment *ev)
  575. {
  576. //   ODBentoContainerData *somThis = ODBentoContainerGetData(somSelf);
  577.     ODBentoContainerMethodDebug("ODBentoContainer","GetTargetContainer");
  578.  
  579.     return kODNULL;
  580. }
  581.  
  582. //------------------------------------------------------------------------------
  583. // ODBentoContainer: GetTargetDocument
  584. //------------------------------------------------------------------------------
  585.  
  586. SOM_Scope CMDocument*  SOMLINK ODBentoContainerGetTargetDocument(ODBentoContainer *somSelf, Environment *ev)
  587. {
  588. //   ODBentoContainerData *somThis = ODBentoContainerGetData(somSelf);
  589.     ODBentoContainerMethodDebug("ODBentoContainer","GetTargetDocument");
  590.  
  591.     return kODNULL;
  592. }
  593.  
  594. //------------------------------------------------------------------------------
  595. // ODBentoContainer: GetModDate
  596. //------------------------------------------------------------------------------
  597.  
  598. SOM_Scope ODTime SOMLINK ODBentoContainerGetModDate(ODBentoContainer *somSelf, Environment *ev)
  599. {
  600.     ODBentoContainerData *somThis = ODBentoContainerGetData(somSelf);
  601.     ODBentoContainerMethodDebug("ODBentoContainer","GetModDate");
  602.  
  603.     return _fModDate;
  604. }
  605.  
  606. //------------------------------------------------------------------------------
  607. // ODBentoContainer: SetModDate
  608. //------------------------------------------------------------------------------
  609.  
  610. SOM_Scope void SOMLINK ODBentoContainerSetModDate(ODBentoContainer *somSelf, Environment *ev, ODTime timer)
  611. {
  612.     ODBentoContainerData *somThis = ODBentoContainerGetData(somSelf);
  613.     ODBentoContainerMethodDebug("ODBentoContainer","SetModDate");
  614.  
  615.     _fModDate = timer;
  616. }
  617.  
  618.